package edu.scau.cxq.gp.schedule;

import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

//@Configuration  //标记配置类
@EnableScheduling   //开启定时任务
public class ScheduledConfig {

    @Scheduled(cron = "0/5 * * * * ? ")
    private void tasks () {
        System.out.println("定时任务已执行");
    }
}
